﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIAKADCORE.Models
{
    /// <summary>
    /// Kelas DetailMatakuliah [dbo].[detail_matakuliah]
    /// </summary>
    public class DetailMatakuliah
    {
        #region Constants
        /// <summary>
        /// Konstanta panjang id dari primary key
        /// </summary>
        public const int IdLength = 10;
        /// <summary>
        /// Konstanta prefix dari primary key
        /// </summary>
        public const string IdPrefix = "DMK";
        /// <summary>
        /// Konstanta nama tabel pada database
        /// </summary>
        public const string TableName = "[dbo].[detail_matakuliah]";
        /// <summary>
        /// Konstanta nama kolom idDetailMatakuliah pada tabel
        /// </summary>
        public const string ColumnNameIdDetailMatakuliah = "[id_detail_matakuliah]";
        /// <summary>
        /// Konstanta nama kolom idMatakuliah pada tabel
        /// </summary>
        public const string ColumnNameIdMatakuliah = "[id_matakuliah]";
        /// <summary>
        /// Konstanta nama kolom idTahun pada tabel
        /// </summary>
        public const string ColumnNameIdTahun = "[id_tahun]";
        /// <summary>
        /// Konstanta nama kolom idPeriode pada tabel
        /// </summary>
        public const string ColumnNameIdPeriode = "[id_periode]";
        /// <summary>
        /// Konstanta nama kolom idKelas pada tabel
        /// </summary>
        public const string ColumnNameIdKelas = "[id_kelas]";
        /// <summary>
        /// Konstanta nama kolom idDosen pada tabel
        /// </summary>
        public const string ColumnNameIdDosen = "[id_dosen]";
        /// <summary>
        /// Konstanta nama kolom idPertemuan pada tabel
        /// </summary>
        public const string ColumnNameIdPertemuan = "[id_pertemuan]";
 
        #endregion

        #region Fields
        /// <summary>
        /// [id_detail_matakuliah] CHAR(10) NOT NULL
        /// </summary>
        private string idDetailMatakuliah;
        /// <summary>
        /// [id_matakuliah] CHAR(5) NOT NULL
        /// </summary>
        private string idMatakuliah;
        /// <summary>
        /// [id_tahun] CHAR(5) NOT NULL
        /// </summary>
        private string idTahun;
        /// <summary>
        /// [id_periode] CHAR(5) NOT NULL
        /// </summary>
        private string idPeriode;
        /// <summary>
        /// [id_kelas] CHAR(5) NOT NULL
        /// </summary>
        private string idKelas;
        /// <summary>
        /// [id_dosen] CHAR(10) NOT NULL
        /// </summary>
        private string idDosen;
        /// <summary>
        /// [id_pertemuan] INT(5) NOT NULL
        /// </summary>
        private string idPertemuan;
        /// <summary>
        /// [id_pelaksanaan_pertemuan] INT(5) NOT NULL
        /// </summary>
        #endregion

        #region Properties
        /// <summary>
        /// [id_detail_matakuliah] CHAR(10) NOT NULL
        /// </summary>
        public string IdDetailMatakuliah
        {
            get { return this.idDetailMatakuliah; }
            set { this.idDetailMatakuliah = value; }
        }

        /// <summary>
        /// [id_matakuliah] CHAR(5) NOT NULL
        /// </summary>
        public string IdMatakuliah
        {
            get { return this.idMatakuliah; }
            set { this.idMatakuliah = value; }
        }

        /// <summary>
        /// [id_tahun] CHAR(5) NOT NULL
        /// </summary>
        public string IdTahun
        {
            get { return this.idTahun; }
            set { this.idTahun = value; }
        }

        /// <summary>
        /// [id_periode] CHAR(5) NOT NULL
        /// </summary>
        public string IdPeriode
        {
            get { return this.idPeriode; }
            set { this.idPeriode = value; }
        }

        /// <summary>
        /// [id_kelas] CHAR(5) NOT NULL
        /// </summary>
        public string IdKelas
        {
            get { return this.idKelas; }
            set { this.idKelas = value; }
        }

        /// <summary>
        /// [id_dosen] CHAR(10) NOT NULL
        /// </summary>
        public string IdDosen
        {
            get { return this.idDosen; }
            set { this.idDosen = value; }
        }
        /// <summary>
        /// [id_pertemuan] INT(5) NOT NULL
        /// </summary>
        public string IdPertemuan
        {
            get { return this.idPertemuan; }
            set { this.idPertemuan = value; }
        }
        /// <summary>
        /// [id_pelaksanaan_pertemuan] INT(5) NOT NULL
        /// </summary>
        #endregion

        #region Constructors
        /// <summary>
        /// Konstruktor
        /// </summary>
        public DetailMatakuliah()
        {

        }

        /// <summary>
        /// Konstruktor
        /// </summary>
        /// <param name="idDetailMatakuliah">[id_detail_matakuliah] CHAR(10) NOT NULL</param>
        /// <param name="idMatakuliah">[id_matakuliah] CHAR(5) NOT NULL</param>
        /// <param name="idTahun">[id_tahun] CHAR(5) NOT NULL</param>
        /// <param name="idPeriode">[id_periode] CHAR(5) NOT NULL</param>
        /// <param name="idKelas">[id_kelas] CHAR(5) NOT NULL</param>
        /// <param name="idDosen">[id_dosen] CHAR(10) NOT NULL</param>
        public DetailMatakuliah(string idDetailMatakuliah, string idMatakuliah, string idTahun, string idPeriode, string idKelas, string idDosen, string idPertemuan)
        {
            this.idDetailMatakuliah = idDetailMatakuliah;
            this.idMatakuliah = idMatakuliah;
            this.idTahun = idTahun;
            this.idPeriode = idPeriode;
            this.idKelas = idKelas;
            this.idDosen = idDosen;
            this.idPertemuan = idPertemuan;
        }
        #endregion

        public override string ToString()
        {
            return string.Format ("ID_DETAIL_MATAKULIAH: {0} | ID_MATAKULIAH: {1} | ID_TAHUN: {2} | ID_PERIODE: {3} | ID_KELAS {4} | ID_DOSEN: {5} | ID_PERTEMUAN: {6}", this.idDetailMatakuliah, this.idMatakuliah, this.idTahun, this.idPeriode, this.idKelas, this.idDosen, this.idPertemuan);
        }
    }
    
}
